#include("../layout.html")
#@layout("标签")

#define body()
<h1 class="wp-heading-inline">标签</h1>
<hr class="wp-header-end">

<div class="layui-fluid">
	<form class="layui-form" action="">
		<div class="search-box">
			<label class="screen-reader-text" for="post-search-input">搜索文章:</label>
			<div class="layui-inline">
				<input type="search" id="post-search-input" name="s" value="" class="layui-input">
			</div>
			<div class="layui-inline">
				<input type="submit" id="search-submit" class="layui-btn layui-btn-sm layui-btn-primary" value="搜索标签">
			</div>
		</div>
	</form>
	<div class="layui-row layui-col-space15">
		<div class="layui-col-md4">
			<h2>添加新标签</h2>
			<form class="layui-form tby-form-left" action="/admin/tag/save">
				<div class="layui-form-item">
		    		<label class="layui-form-label">名称</label>
		    		<div class="layui-input-block">
		    			<input type="text" name="name" id="name" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
		   	 		</div>
		   	 		<p>这将是它在站点上显示的名字。</p>
		    	</div>
		    	<div class="layui-form-item">
		    		<label class="layui-form-label">别名</label>
		    		<div class="layui-input-block">
		    			<input type="text" name="slug" id="slug" placeholder="" autocomplete="off" class="layui-input">
		   	 		</div>
		   	 		<p>“别名”是在URL中使用的别称，它可以令URL更美观。通常使用小写，只能包含字母，数字和连字符（-）。</p>
		    	</div>
		    	<div class="layui-form-item">
		    		<label class="layui-form-label">图像描述</label>
		    		<div class="layui-input-block">
		    			<textarea name="description" id="description" placeholder="" class="layui-textarea"></textarea>
		   	 		</div>
		   	 		<p>描述只会在一部分主题中显示。</p>
		    	</div>
		    	<div class="layui-form-item">
	    			<button type="submit" lay-submit lay-filter="*" class="layui-btn layui-btn-sm">添加新标签</button>
	    		</div>
		    </form>
		</div>
		<div class="layui-col-md8">
			<h2 class="screen-reader-text">过滤文章列表</h2>
			
			<form id="posts-filter" class="layui-form">
				<div class="tablenav top">
					<div class="alignleft actions bulkactions">
						<label for="bulk-action-selector-top" class="screen-reader-text">选择批量操作</label>
						<div class="layui-inline">
							<select name="action" id="bulk-action-selector-top">
								<option value="-1">批量操作</option>
								<option value="trash">删除</option>
							</select>
						</div>
						<div class="layui-inline">
							<input type="submit" id="doaction" class="layui-btn layui-btn-sm layui-btn-primary" value="应用">
						</div>
					</div>
					<div class="alignleft actions">
						
					</div>
					<div class="tablenav-pages"></div>
					<br class="layui-clear">
				</div>
				
				<h2 class="screen-reader-text">文章列表</h2>
				<table class="layui-table" lay-skin="line" lay-even>
				  	<colgroup>
				  		<col width="30">
				    	<col>
				    	<col width="120">
				    	<col width="180">
				    	<col width="60">
				  	</colgroup>
				  	<thead>
				    	<tr align="left">
				    		<th><input type="checkbox" name="" lay-skin="primary"></th>
				      		<th>名称</th>
				      		<th>图像描述</th>
				      		<th>另名</th>
				      		<th>总数</th>
				    	</tr> 
				  	</thead>
				  	<tbody>
				    	
				  	</tbody>
				  	#[[
					  	<script id="tag-page-tpl" type="text/xml">
						{{# layui.each(d, function(index, item){ }}
					  	<tr align="left">
				    		<td><input type="checkbox" name="" lay-skin="primary"></td>
				      		<td>
				      			<strong>{{item.name}}</strong>
				      			<div class="row-actions">
				      				<span class="edit"><a href="/admin/tag/edit?term_id={{item.term_id}}" aria-label="编辑“(无标题)”">编辑</a> | </span>
				      				<span class="view"><a href="" rel="bookmark" aria-label="预览“(无标题)”">查看</a></span>
				      			</div>
				      		</td>
				      		<td>
				      			{{item.description}}
				      		</td>
				      		<td>
				      			{{item.slug}}
				      		</td>
				      		<td>
				      			<span>—</span>
				      			<span class="screen-reader-text">没有标签</span>
							</td>
				    	</tr>
						{{# }); }}
					  	</script>
				  	]]#
				  	<tfoot>
				    	<tr align="left">
				    		<th><input type="checkbox" name="" lay-skin="primary"></th>
				      		<th>名称</th>
				      		<th>图像描述</th>
				      		<th>别名</th>
				      		<th>总数</th>
				    	</tr> 
				  	</tfoot>
				</table>
				
				<div class="tablenav bottom">
					<div class="alignleft actions bulkactions">
						<label for="bulk-action-selector-bottom" class="screen-reader-text">选择批量操作</label>
						<div class="layui-inline">
							<select name="action2" id="bulk-action-selector-bottom">
								<option value="-1">批量操作</option>
								<option value="trash">删除</option>
							</select>
						</div>
						<div class="layui-inline">
							<input type="submit" id="doaction2" class="layui-btn layui-btn-sm layui-btn-primary" value="应用">
						</div>
					</div>
					<div class="alignleft actions">
					</div>
					<div class="tablenav-pages"></div>
					<br class="layui-clear">
				</div>
			</form>
		</div>
	</div>
	
</div>
#end

#define foot()
<script>
layui.cache.page = 'tag';
</script>
#end